import request from '@/utils/request'
import { getToken } from '@/utils/auth'
var token = getToken();
export function getRank (page, pageSize) {
  return request({
    url: '/pc/management/report/getSalesRanking',
    method: 'post',
    data: {
      token: token, page: page, pageSize: pageSize
    }
  })
}
export function getMonth (time) {
  return request({
    url: '/pc/management/report/getMonthByYear',
    method: 'post',
    data: {
      token: token,
      time: time
    }
  })
}
export function getAllYear () {
  return request({
    url: '/pc/management/report/getAllYear',
    method: 'post',
    data: {
      token: token,
    }
  })
}
export function getT (time, page, pageSize) {
  return request({
    url: '/pc/management/report/getSales',
    method: 'post',
    data: {
      token: token,
      time: time, page: page, pageSize: pageSize
    }
  })
}
export function getRecord (time, page, pageSize) {
  return request({
    url: '/pc/management/report/getlist',
    method: 'post',
    data: {
      token: token,
      time: time, page: page, pageSize: pageSize
    }
  })
}

